<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditVeiculoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditVeiculoLabel_idVeiculo}" for="idVeiculo" />
                    <h:inputText id="idVeiculo" value="#{veiculoController.selected.idVeiculo}" title="#{bundle.EditVeiculoTitle_idVeiculo}" required="true" requiredMessage="#{bundle.EditVeiculoRequiredMessage_idVeiculo}"/>
                    <h:outputLabel value="#{bundle.EditVeiculoLabel_descricaoVeiculo}" for="descricaoVeiculo" />
                    <h:inputText id="descricaoVeiculo" value="#{veiculoController.selected.descricaoVeiculo}" title="#{bundle.EditVeiculoTitle_descricaoVeiculo}" required="true" requiredMessage="#{bundle.EditVeiculoRequiredMessage_descricaoVeiculo}"/>
                    <h:outputLabel value="#{bundle.EditVeiculoLabel_peso}" for="peso" />
                    <h:inputText id="peso" value="#{veiculoController.selected.peso}" title="#{bundle.EditVeiculoTitle_peso}" required="true" requiredMessage="#{bundle.EditVeiculoRequiredMessage_peso}"/>
                    <h:outputLabel value="#{bundle.EditVeiculoLabel_estado}" for="estado" />
                    <h:inputText id="estado" value="#{veiculoController.selected.estado}" title="#{bundle.EditVeiculoTitle_estado}" required="true" requiredMessage="#{bundle.EditVeiculoRequiredMessage_estado}"/>
                    <h:outputLabel value="#{bundle.EditVeiculoLabel_fkMarca}" for="fkMarca" />
                    <h:selectOneMenu id="fkMarca" value="#{veiculoController.selected.fkMarca}" title="#{bundle.EditVeiculoTitle_fkMarca}" required="true" requiredMessage="#{bundle.EditVeiculoRequiredMessage_fkMarca}">
                        <f:selectItems value="#{marcaController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditVeiculoLabel_fkModelo}" for="fkModelo" />
                    <h:selectOneMenu id="fkModelo" value="#{veiculoController.selected.fkModelo}" title="#{bundle.EditVeiculoTitle_fkModelo}" required="true" requiredMessage="#{bundle.EditVeiculoRequiredMessage_fkModelo}">
                        <f:selectItems value="#{modeloController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{veiculoController.update}" value="#{bundle.EditVeiculoSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditVeiculoViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{veiculoController.prepareList}" value="#{bundle.EditVeiculoShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditVeiculoIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
